package day3;

/**
 * ClassName：TestPrint
 *
 * @Author：小鱼
 * @Create：2025-08-20 11:06
 */
public class TestPrint {
    public static void main(String[] args) {
        //创建MYPrint对象
        MyPrint myP = new MyPrint();
        //同步功能在线程体现
        //创建线程
        Thread t1 = new Thread(){
            @Override
            public void run(){
                for (int i = 0; i < 10; i++) {
                    myP.print1();
                    MyPrint.print3();
                }
            }
        };

        Thread t2 = new Thread(){
            @Override
            public void run(){
                for (int i = 0; i < 10; i++) {
                    myP.print2();
                }
            }
        };
        t1.start();
        t2.start();
    }
}
